package com.huanghao.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.huanghao.pojo.Commod;
import com.huanghao.pojo.Order;

@Mapper
@Repository
public interface OrderMapper {

	List<Order> page(@Param("oName") String name, @Param("oUser") String user);	//根据查询


	//根据ID查询
	@Select("select * from orderser where oNumber = #{oNumber} and flag = 1")
	Order getById(Integer id);


	void deleteByid(@Param("oNumber")   List<Integer> oNumber);

	 @Insert("INSERT INTO orderser(`oName`,`oUser`,`oMoney`,`flag`) VALUES(#{oName},#{oUser},#{oMoney},1)")
	void add(Order order);


	void update(Order order);

}
